package com.itheima.mybatiscurdhowork.service.impl;

import com.itheima.mybatiscurdhowork.mapper.EmpMapper;
import com.itheima.mybatiscurdhowork.pojo.Emp;
import com.itheima.mybatiscurdhowork.service.EmpService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * EmpService
 *
 * @author liudo
 * @version 1.0
 * @project mybatis-curd-howork
 * @date 2024/1/21 16:18:54
 */
@Service
@RequiredArgsConstructor
public class EmpServiceImpl implements EmpService {

    private final EmpMapper empMapper;

    @Override
    public void saveOne(Emp emp) {
        empMapper.saveOne(emp);

    }

    @Override
    public void removeById(String id) {
        empMapper.removeById(id);
    }

    @Override
    public void updateById(Emp emp) {
        empMapper.updateById(emp);
    }

    @Override
    public List<Emp> queryList() {
        return empMapper.queryList();
    }

    @Override
    public Emp queryById(String id) {
        return empMapper.queryById(id);
    }
}
